package com.clw.practice.jol;

import java.util.concurrent.Callable;

public class MyThread implements Callable<String> {
	
	private int ticket=10;
	
	@Override
	public String call() throws Exception {
		for(int i=0;i<200;i++){
            if(this.ticket>0){
                System.out.println(Thread.currentThread().getName() + "  ticket="+ticket--);
            }
        }
        return "ticket sold out!";
	}

}
